package spider.cluster;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import spider.zookeeper.monitor.ClusterMonitor;

/**
 * SpiderClusterApplication
 *
 * @author Archx[archx@foxmail.com]
 * @date 2017/4/9.
 */
@SpringBootApplication
public class SpiderClusterApplication  {

    @Bean
    @ConfigurationProperties(prefix = "cluster") // 自动注入 cluster 开头的属性
    public ClusterMonitor clusterMonitor() {
        return new ClusterMonitor();
    }

    public static void main(String[] args) {
        SpringApplication.run(SpiderClusterApplication.class, args);
    }
}
